//
//  RestaurantResponse.swift
//  FeastBooking
//
//  Created by Imon on 2017/10/6.
//  Copyright © 2017年 Imon. All rights reserved.
//

import Foundation
import ObjectMapper

class RestaurantSummaryResponse: Response {
    
    var id: Int?
    var name: String?
    var numOfReviews: Int?
    var districtOfAddress: String?
    var pictureUrl: String?
    var priceRange: [Double]?
    var tableRange: [Int]?
    
    required init?(map: Map) {
        super.init(map: map)
    }
    
    override func mapping(map: Map) {
        super.mapping(map: map)
        id <- map["id"]
        name <- map["name"]
        districtOfAddress <- map["districtOfAddress"]
        numOfReviews <- map["numOfReviews"]
        pictureUrl <- map["pictureUrl"]
        priceRange <- map["priceRange"]
        tableRange <- map["tableRange"]
    }
}

class RestaurantDetailResponse: Response {
    
    var address: RestaurantAddress?
    var banquetHalls: [RestaurantBanquetHall]?
    var contact: String?
    var rest_description: String?
    var email: String?
    var feasts: [RestaurantFeast]?
    var id: Int?
    var name: String?
    var pictureUrls: [String]?
    var priceRange: [Double]?
    var rating: Double?
    var numOfReviews: Int?
    var tableRange: [Int]?
    var telephone: String?
    
    required init?(map: Map) {
        super.init(map: map)
    }
    
    override func mapping(map: Map) {
        super.mapping(map: map)
        address <- map["address"]
        banquetHalls <- map["banquetHalls"]
        contact <- map["contact"]
        rest_description <- map["description"]
        email <- map["email"]
        feasts <- map["feasts"]
        id <- map["id"]
        name <- map["name"]
        pictureUrls <- map["pictureUrls"]
        priceRange <- map["priceRange"]
        rating <- map["rating"]
        tableRange <- map["tableRange"]
        telephone <- map["telephone"]
        numOfReviews <- map["numOfReviews"]
    }
}
